<%@ page import="com.zhen.utils.JdbcUtils" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String UNAME = (String) session.getAttribute("UNAME");%>
<%
    String sql = "select count(1) from `user`";
    Long unum = JdbcUtils.select(sql, Long.class);
    String sql2 = "select count(1) from `goods`";
    Long gnum = JdbcUtils.select(sql2, Long.class);
%>
<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>水果商城后台管理</title>
    <link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="assets/vendors/font-awesome-4.7.0/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="assets/css/core.css"/>
    <link rel="stylesheet" href="assets/css/index.css"/>

    <link rel="stylesheet" href="assets/css/welcome.css"/>
</head>

<body>
<jsp:include page="/WEB-INF/tpl/zhen/header.jsp"></jsp:include>
<section class="container">
    <jsp:include page="/WEB-INF/tpl/zhen/left.jsp"></jsp:include>
    <div class="main-right">
        <h3>欢迎您，<%=UNAME%>
        </h3>
        <div class="summary-container">
            <div class="summary-category">
                <div class="summary-desc">
                    <span class="summary-title">分类总数</span>
                    <span class="summary-value"><%=gnum%></span>
                </div>
                <div class="summary-icon">
                    <i class="fa fa-star-o"></i>
                </div>
            </div>
            <div class="summary-goods">
                <div class="summary-desc">
                    <span class="summary-title">商品总数</span>
                    <span class="summary-value"><%=gnum%></span>
                </div>
                <div class="summary-icon">
                    <i class="fa fa-bars"></i>
                </div>
            </div>
            <div class="summary-user">
                <div class="summary-desc">
                    <span class="summary-title">用户总数</span>
                    <span class="summary-value"><%=unum%></span>
                </div>
                <div class="summary-icon">
                    <i class="fa fa-users"></i>
                </div>
            </div>
        </div>
    </div>
</section>
</body>

</html>